package pl.edu.agh.neurony.logic.activationFunctions;

import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public interface ActivationFunc {

	public double run(double input);
	public double derivative(double input);

	public String getName();

	public static final ActivationFunc[] functions = { new ReturnInputFunc(),
			new LinearFunc(), new SigmoidalFunc(), new ThresholdFunc() };

	public static final Map<String, ActivationFunc> nameToFunction = Collections
			.unmodifiableMap(new HashMap<String, ActivationFunc>() {
				{
					for (ActivationFunc func : functions)
						put(func.getName(), func);
				}
			});
}
